<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<script>
var re = /\d+/g;
var str = 'asd 4 as 699 == 7';

alert(str.match(re));
</script>
</head>

<body>
</body>
</html>
